<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="TestServlet" onclick="return queren()">删除</a>
</body>
</html>
<script>
    function queren() {
        var result = confirm("确认删除？");
        if (result) {
            return true;
        } else {
            return false;
        }
    }
</script>